package es.cea;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


public class ListenerContexto implements ServletContextListener {

    public ListenerContexto() {
        
    }
	
    public void contextInitialized(ServletContextEvent arg0) {
       List<Agenda> agenda =new ArrayList<Agenda>();
       agenda.add(new Agenda("Julian","454555454"));
       agenda.add(new Agenda("Ramiro","4476478478"));
       agenda.add(new Agenda("Estela","456678888"));
       agenda.add(new Agenda("Yago","4787744100"));
       agenda.add(new Agenda("Ines","487505450"));
       agenda.add(new Agenda("Nacho","1545456565"));
       
       arg0.getServletContext().setAttribute(MisEnums.agenda.toString(), agenda);
       
      
    }

    public void contextDestroyed(ServletContextEvent arg0) {
        
    }
	
}
